<template>
	
	<view class="container">  
	    <view class="student-info">  
		<image src="../../static/boy.png" mode=""></image>
		<view class="info-item">
		  <text class="info-label">编号:</text>  
		  <text class="info-value">{{ stu.id }}</text>  
		</view> 
	      <view class="info-item">  
	        <text class="info-label">姓名:</text>  
	        <text class="info-value">{{ stu.name }}</text>  
	      </view>  
	     
	      <view class="info-item">  
	        <text class="info-label">学院:</text>  
	        <text class="info-value">{{ stu.department }}</text>  
	      </view>  
		  <view class="info-item">
		    <text class="info-label">专业:</text>  
		    <text class="info-value">{{ stu.major }}</text>  
		  </view>  
		  <view class="info-item">
		    <text class="info-label">电话:</text>  
		    <text class="info-value">{{ stu.telephone }}</text>  
		  </view>  
		  <view class="info-item">
		    <text class="info-label">邮箱:</text>  
		    <text class="info-value">{{ stu.email }}</text>  
		  </view>  
	    </view>  
	  </view>  
</template>

<script>
	export default {
		data() {
			return {
				stu:''
			}
		},
		methods: {
			
		},
		onLoad(option) {
			// console.log(option.itemid);
			uni.request({
				url: 'http://localhost:8091/freshmenapp/classmate/findone',
				method: 'POST',
				data: {id : option.itemid},
				success: res => {
					// console.log(res.data.data);
					this.stu = res.data.data
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>
	image{
		width: 100px;
		height: 100px;
		margin-bottom: 30px;
	}
	
	.container {  
	  padding: 20rpx;  
	  text-align: center;
	}  
	  
	.student-info {  
	  margin-top: 20rpx;  
	}  
	  
	.info-item {  
	  display: flex;  
	  justify-content: space-between;  
	  align-items: center;  
	  padding: 10rpx 0;  
	  border: 1px solid #ccc;
	  border-radius: 10px;
	  margin-top: 5px;
	  background-color: #f5f5f5;
	}  
	  
	.info-label {  
	  font-weight: bold;  
	  width: 100rpx;  
	  /* padding: 3px; */
	}  
	  
	.info-value {  
	  flex: 1;  
	}  
</style>
